/*
 * @Author: blak-kong
 * @Date: 2019-12-02 16:37:21
 * @Email: 546598185@qq.com
 */
// @login & register
const router = require('koa-router')()
router.prefix('/api/users')

// controller
const controller = require("../controller")

// @route  POST api/users/register
// @desc   返回的请求的json数据
// @access public
router.get('/test', async (ctx, next) => {
  ctx.body = "hello users!"
})
.post('/register', controller.user.register)
.post('/login', controller.user.login)

module.exports = router;
